<template>
	<view class="wp">
		<view class="pack">
			<!-- <view class="pack_item" @click="$toTab('plugin://express-plugin/home?shareCode=2160wimWEi')">
				<view class="pack_img">
					<image src="/static/kuaidi.png" role="img" mode="heightFix"></image>
				</view>
				<text class="pack_title">寄快递</text>
			</view>
			<view class="pack_item" @click="$toTab('plugin://ticketPlugin/home?shareCode=2160wimWEi&reLocation=true')">
				<view class="pack_img">
					<image src="/static/dianying.png" role="img" mode="heightFix"></image>
				</view>
				<text class="pack_title">电影票</text>
			</view>
			<view class="pack_item" @click="$toTab('plugin://collectionPlugin/collectionHome?shareCode=2160wimWEi')">
				<view class="pack_img">
					<image src="/static/diancan.png" role="img" mode="heightFix"></image>
				</view>
				<text class="pack_title">在线点餐</text>
			</view>
			<view class="pack_item" @click="$toTab('plugin://collectionPlugin/kfcHome?shareCode=XXX')">
				<view class="pack_img">
					<image src="/static/meituan.png" role="img" mode="heightFix"></image>
				</view>
				<text class="pack_title">美团神券</text>
			</view>
			<view class="pack_item" @click="$toTab('/pages/mallHome/index')">
				<view class="pack_img">
					<image src="/static/miao.png" role="img" mode="heightFix"></image>
				</view>
				<text class="pack_title">秒杀</text>
			</view> -->
			<view class="pack_item" v-for="item in list" @click="$toTab(item.url)">
				<view class="pack_img">
					<image :src="item.thumb" role="img" mode="heightFix"></image>
				</view>
				<text class="pack_title">{{item.title}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"category",
		props: {
			bg: {
				type: String,
				default: ''
			},
			list: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			$toTab(url){
				uni.navigateTo({
					url: url
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.wp{
		// background: $bg-color;
		margin-top: 20rpx;
		padding: 0 0 20rpx;
		.pack{
			background: white;
			display: flex;
			flex-wrap: wrap;
			justify-content: flex-start;
			padding: 10rpx 10rpx;
			border-radius: 10rpx;
			.pack_item{
				width: 20%;
				text-align: center;
				word-wrap: nowrap;
				margin-top: 10rpx;
				.pack_img{
					height: 80rpx;
					image{
						height: 100%;
					}
				}
				.pack_title{
					font-size: 24rpx;
				}
			}
		}
	}
</style>